package com.hrm.houfei.biz.impl;

import java.util.List;

import com.hrm.houfei.biz.IPrimaryKeyBiz;
import com.hrm.houfei.dao.IPrimaryKeyDAO;
import com.hrm.houfei.po.Primarykeycn;

public class PrimaryKeyBizImpl implements IPrimaryKeyBiz {

	// IPrimaryKeyDAO接口
	IPrimaryKeyDAO ipkdao = null;

	// IPrimaryKeyDAO接口set方法,以供spring调用
	public void setIpkdao(IPrimaryKeyDAO ipkdao) {
		this.ipkdao = ipkdao;
	}

	public PrimaryKeyBizImpl() {
		super();
	}

	/**
	 * 获取父节点的所有子节点
	 * 
	 * @param parentId 父节点
	 * @return 返回父节点的所有子节点
	 */
	public List<Primarykeycn> getTreeNodeById(String parentId) {
		Integer iparentId=Integer.parseInt(parentId);
		List<Primarykeycn> list = ipkdao.findByProperty("parentId", iparentId);
		return list;
	}

}
